home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / win_utl1 / mtwdo301.zip / ENV.CMD < prev    next >
OS/2 REXX Batch file  |  1996-02-09  |  663b  |  38 lines

  1. ;
  2. ; When the environment variable SWAPDRIVE has the value C:
  3. ; then the condition is true
  4. ;
  5. if env SWAPDRIVE == C:
  6. +[386enh]swapfile=C:
  7. else
  8. +[386enh]swapfile=D:
  9. endif
  10.  
  11. ;
  12. ; Same a above, but since the compared value contains blanks,
  13. ; you must put the String into " .... "
  14. ;
  15. ;
  16. ;
  17. if env SWAPTEXT == "Swapfile on drive C:"
  18. +[386enh]swapfile=C:
  19. else
  20. +[386enh]swapfile=D:
  21. endif
  22.  
  23.  
  24. ;
  25. ; When you want to replace a string anywhere in the INI file, then
  26. ; use the r command with a empty section [].
  27. ;
  28. r[]OldString=NewString
  29.  
  30. ;
  31. ; When you would replace a = sign, then enclose the OldString in ".."
  32. ;
  33. r[]"Old=String"=New=String2
  34.  
  35.  
  36.